<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图片文字对齐</title>

    <style>
        img {
            /* 底线对齐 */
            /* vertical-align: bottom; */
            /* 中线对齐 */
            vertical-align: middle;
            /* 顶部对齐 */
            /* vertical-align: top; */
        }

        textarea {
            vertical-align: middle;
        }
    </style>

</head>
<body>
    
    <img src="vertical-align图片文字对齐.png" alt="">
    <br>
    <img src="基线.png" alt="">
    
    <br><br>

    <img src="../../imgs/123.jpg" alt=""> p测试文字对齐

    <br><br>

    <textarea name="" id="" cols="30" rows="10"></textarea> p测试文字对齐
            
</body>
</html>